package com.edgarli.detail.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edgarli.detail.mapper.IncomeMapper;
import com.edgarli.detail.domain.TIncome;
import com.edgarli.detail.service.IIncomeService;

/**
 * 家庭收入Service业务层处理
 *
 * @author EdgarLi
 * @date 2022-01-12
 */
@Service
public class IncomeServiceImpl extends ServiceImpl<IncomeMapper, TIncome> implements IIncomeService {
    @Autowired
    private IncomeMapper incomeMapper;

    /**
     * 查询家庭收入
     *
     * @param incomeId 家庭收入主键
     * @return 家庭收入
     */
    @Override
    public TIncome selectIncomeByIncomeId(Long incomeId) {
        return incomeMapper.selectIncomeByIncomeId(incomeId);
    }

    /**
     * 查询家庭收入列表
     *
     * @param income 家庭收入
     * @return 家庭收入
     */
    @Override
    public List<TIncome> selectIncomeList(TIncome income) {
        return incomeMapper.selectIncomeList(income);
    }


    /**
     * 批量删除家庭收入
     *
     * @param incomeIds 需要删除的家庭收入主键
     * @return 结果
     */
    @Override
    public int deleteIncomeByIncomeIds(Long[] incomeIds) {
        return incomeMapper.deleteIncomeByIncomeIds(incomeIds);
    }

    /**
     * 删除家庭收入信息
     *
     * @param incomeId 家庭收入主键
     * @return 结果
     */
    @Override
    public int deleteIncomeByIncomeId(Long incomeId) {
        return incomeMapper.deleteIncomeByIncomeId(incomeId);
    }
}
